﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.金蝶
{
    public partial class Form款式BOM及在途信息 : DevExpress.XtraEditors.XtraForm
    {
        public Form款式BOM及在途信息()
        {
            InitializeComponent();
            this.刷新();
        }

        private void simpleButton刷新_Click(object sender, EventArgs e)
        {
            this.刷新();
        }
        private void 刷新()
        {
            this.gridControl款式BOM和在途.DataSource = 金蝶BOMService.getBomDetailAll();
            this.gridView款式BOM和在途.RefreshData();
            this.gridViewBOM明细.RefreshData();
        }


        private void gridViewBOM明细_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        {
            try
            {
                if (e.Column.Name.Equals("gridColumn金蝶库存数量"))
                {
                    if ("0".Equals(e.CellValue.ToString()))
                    {
                        e.Appearance.BackColor = Color.DeepPink;
                        e.Appearance.ForeColor = Color.White;
                    }
                }
            }
            catch { }
        }
    }
}
